/*
 * @(#)cn.design.pattern.iterator 2020/4/24/0024
 *
 * Copy Right@ 人人译视界
 */


package cn.design.pattern.iterator;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * <pre>
 * @author tuwei
 *
 * @version 0.9
 *
 * 修改版本: 0.9
 * 修改日期: 2020/4/24/0024
 * 修改人 :  tuwei
 * 修改说明: 初步完成
 * 复审人 ：
 * </pre>
 */
public class InfoCollege implements College {
	List<Department> departmentList;

	public InfoCollege() {
		departmentList = new ArrayList<>(5);
		addDepartment("信息安全专业", "信息安全专业");
		addDepartment("网络安全专业", "网络安全专业");
		addDepartment("数据安全专业", "数据安全专业");
	}

	@Override
	public String getName() {
		return "信息工程学院";
	}

	@Override
	public void addDepartment(String name, String desc) {
		Department department = new Department(name, desc);
		departmentList.add(department);
	}

	@Override
	public Iterator createIterator() {
		return new InfoCollegeIterator(departmentList);
	}
}
